package com.lin.cms.domain;

import java.io.Serializable;

public class Template implements Serializable {

	private static final long serialVersionUID = 1L;

	private String tplName;

	private String tplSource;

	private long lastModified;

	private String isDirectory;

	public Template() {
	}

	public String getTplName() {
		return tplName;
	}

	public void setTplName(String tplName) {
		this.tplName = tplName;
	}

	public String getTplSource() {
		return tplSource;
	}

	public void setTplSource(String tplSource) {
		this.tplSource = tplSource;
	}

	public long getLastModified() {
		return lastModified;
	}

	public void setLastModified(long lastModified) {
		this.lastModified = lastModified;
	}

	public String getIsDirectory() {
		return isDirectory;
	}

	public void setIsDirectory(String isDirectory) {
		this.isDirectory = isDirectory;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((tplName == null) ? 0 : tplName.hashCode());

		return result;
	}
	
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		final Template other = (Template) obj;
		if (tplName == null) {
			if (other.tplName != null)
				return false;
		} else if (!tplName.equals(other.tplName))
			return false;

		return true;
	}
	
	@Override
	public String toString() {
		return getClass().getName() + "@" + Integer.toHexString(hashCode()) + 
			"(" + 
			"tplName=" + "'" + tplName + "'" + 
			")";
	}
	
}
